<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="f"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>easety注册</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript">
      function checkSubmit(){
      
        //校验 不通过不提交
        /**
        var name=document.getElementsByName("name")[0].value;
        if(name==null || name==""){
            alert("用户名不能为空");
        	return;
        }
        var password=document.getElementsByName("password")[0].value;
        var repassword=document.getElementsByName("repassword")[0].value;
        if(password!=repassword){
            alert("两次输入密码不一致");
        	return;
        }
        **/
      	document.forms[0].submit();
      }
   
   </script>
  </head>
  
  <body >
  <div style="margin-top:82px;text-align: center;">


  	<a href="${pageContext.request.contextPath}/mid?a=zh_CN">中文</a><a href="${pageContext.request.contextPath}/mid?a=en_GB">English</a>
     <form action="<%=path %>/myreg" method="post"> 
         <f:message code="username"></f:message> :<input type="text" name="name"/>*
         <font color=red><form:errors path="user.name"></form:errors></font>
         <br/>
         <f:message code="password"></f:message> :<input type="password" name="password"/>*
         <font color=red><form:errors path="user.password"></form:errors></font>
         <br/>
         <f:message code="repassword"></f:message> :<input type="password" name="repassword"/>*
         <font color=red><form:errors path="user.repassword"></form:errors></font>
         <br/>
         <f:message code="email"></f:message> :<input type="text" name="email"/>*
         <font color=red><form:errors path="user.email"></form:errors></font>
         <br/>
         <f:message code="age"></f:message>:<input type="text" name="age"/>*
         <font color=red><form:errors path="user.age"></form:errors></font>
         <br/>
         <f:message code="phone"></f:message>:<input type="text" name="phone"/>*
         <font color=red><form:errors path="user.phone"></form:errors></font>
         <br/>
        <f:message code="dob"></f:message><input type="text" name="dob"/>*
         <font color=red><form:errors path="user.dob"></form:errors></font>
         <br/>      
   <!-- 时间 输入格式  yyyy-MM-dd -->     
   <!-- 网址  http://www.baidu.com   http://ip：端口/ -->
        <button onclick="checkSubmit()"><f:message code="register"></f:message> </button>
     </form><br/>
 	</div>
  </body>
</html>
